﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WEB.sheetInfo
{
    public partial class sheetCosutmsNoInput : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            AddCustomsNo();
        }

        public string AddCustomsNo()
        {
            string str = tbRes.Text;

            foreach (Control c in panelAdd.Controls)
            {
                if (c is TextBox)
                {
                    TextBox tb = c as TextBox;
                    if (tb.Text != "")
                    {
                        if (str == "") { str += string.Format("{0}", tb.Text); }
                        else { str += string.Format(",{0}", tb.Text); }
                    }
                    tb.Text = "";
                }
            }
            tbRes.Text = str;
            return str;
        }
    }
}